<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>抽奖活动</title>
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/dpl.css" rel="stylesheet">
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/bui.css" rel="stylesheet">
<script src="http://g.tbcdn.cn/fi/bui/jquery-1.8.1.min.js"></script>
<script src="http://g.alicdn.com/bui/seajs/2.3.0/sea.js"></script>
<script src="http://g.alicdn.com/bui/bui/1.1.21/config.js"></script>
<script src="/assets/umpadmin/index.js"></script>
<script src="/assets/umpadmin/items.js"></script>
<link href="/assets/umpadmin/style.css" rel="stylesheet">
	<style>
	h1 button,h2 button,h3 button,h4 button,.title button,.gift_hqfs button,.title a{ldelim}position:absolute{rdelim}
	a.js-edit {ldelim}margin-left:5px{rdelim}
	.mobile {ldelim}  display: inline-block;
		  padding-left: 25px;
		  vertical-align: text-top;
		  background: url(//img.alicdn.com/tps/i2/T1tfzjFLdbXXXXERPb-25-80.png) 5px no-repeat;
	{rdelim}
	.pc {ldelim}  display: inline-block;
		  padding-left: 30px;
		  vertical-align: text-top;
		  background: url(//img.alicdn.com/tps/i2/T1tfzjFLdbXXXXERPb-25-80.png) 5px 5px no-repeat;
	{rdelim}
	</style>
</head>
<body style="width:990px;margin:0 auto;padding:10px 0;">
<input type="hidden" class="cid" value="{$catid}" />
 <div class="doc-content">
    <div class="panel">
      <div class="panel-body">
	  
	  <div class="row">
		<div class="span24 doc-content">
		<h3 class="pull-left">朋友圈的二维码优惠 >>  </h3>
		<div class="button-group pull-right">
		 {include file='../global_menu.html'}
		</div>
		</div>
	  </div>
	  <hr />
	  <div class="row">
  <div class="span24 doc-content">
	<div class="row" style="margin-bottom:20px">
	<div class="span8 centered"><img src="https://img.alicdn.com/imgextra/i4/27390555/TB2n.7xjFXXXXabXpXXXXXXXXXX-27390555.jpg_300x300.jpg" /></div>
	<div class="span13 offset1" >
		<h2>邀请规则案例（用例）：</h2>
		<h4>　　第<font style="font-size:30px;color:orange;line-height:30px;">1</font>位朋友扫码：邀请人<img src="https://img.alicdn.com/imgextra/i4/27390555/TB26wEZjFXXXXaJXXXXXXXXXXXX-27390555.png_30x30" style="vertical-align:text-bottom" /></img>便宜<font style="font-size:30px;color:fuchsia;line-height:30px;">1</font>元，被邀请人<img src="https://img.alicdn.com/imgextra/i4/27390555/TB2vHg0jFXXXXajXXXXXXXXXXXX-27390555.png_30x30" style="vertical-align:text-bottom"/>便宜<font style="font-size:30px;color:green;line-height:30px;">10</font>元；</h4>
		<h4>　　第<font style="font-size:30px;color:orange;line-height:30px;">N</font>位朋友扫码：邀请人<img src="https://img.alicdn.com/imgextra/i4/27390555/TB26wEZjFXXXXaJXXXXXXXXXXXX-27390555.png_30x30" style="vertical-align:text-bottom" /></img>便宜<font style="font-size:30px;color:fuchsia;line-height:30px;">1xN</font>元，被邀请人<img src="https://img.alicdn.com/imgextra/i4/27390555/TB2vHg0jFXXXXajXXXXXXXXXXXX-27390555.png_30x30" style="vertical-align:text-bottom"/>便宜<font style="font-size:30px;color:green;line-height:30px;">10</font>元；</h4>
	    <!--div class="button-group " style="margin-bottom:20px">
		  <a class="button" href="/?m=umpadmin"><i class="icon-list-alt"></i>邀请规则</a>
		  <a href="/?m=umpadmin" class="button"><i class="icon-user"></i>邀请人</a>
		  <a class="button" href="/?m=umpadmin"><i class="icon-qrcode"></i>被邀请人</a>
		  <a class="button" href="/?m=umpadmin"><i class="icon-random"></i>关系链</a>
		  <a class="button" href="/?m=umpadmin"><i class="icon-gift"></i>小游戏</a>
		  <a class="button" href="/?m=umpadmin"><i class="icon-gift"></i>外观</a>
	    </div-->
	</div>
	</div>
	  <ul class="toolbar">
        <li><a href="/?m=umpadmin&c=event&a=step1" class="button  button-primary"><i class="icon-white icon-user"></i>创建邀请折扣</a></li>
        <!-- <li><a href="/?m=umpadmin&a=rule" class="button  button-warning"><i class="icon-white icon-random"></i>创建普通折扣</a></li> -->
		<li><a href="#" class="offset1">{$usernick}</a>您好！店铺ID：<a href="//shop{$sid}.taobao.com" target="_blank">{$sid}</a></li>
		
        <li class="pull-right"><form method="post" action="/?m=Shopadmin&c=Event&a=index&t={$t}"><input name="q" type="text" class=" input calendar" value="{$q|default:""}" data-tip="{ldelim}ext : '{$L.APP_SEARTCH}'{rdelim}" /> <button class="button"><i class="icon-search"></i>搜索</button></form></li>
      </ul> 
	  {if $info}
	    <ul class="breadcrumb">
			<li class="active">{$info}</li>
		</ul>
	  {/if}
		<div id="tab">
		<ul class="bui-tab link-tabs" aria-disabled="false" aria-pressed="false">
		<!-- <li class="bui-tab-item" aria-disabled="false" aria-pressed="false"><a href="#">入口折扣</a></li> -->
		<li class="bui-tab-item bui-tab-item-selected" aria-disabled="false" aria-pressed="false"><a href="/?m=umpadmin&a=index">二维码折扣</a></li>
		<!-- <li class="bui-tab-item" aria-disabled="false" aria-pressed="false"><a href="#">普通折扣</a></li> -->
		<!-- <li class="bui-tab-item" aria-disabled="false" aria-pressed="false"><a href="#">小游戏</a></li> -->
		<!-- <li class="bui-tab-item" aria-disabled="false" aria-pressed="false"><a href="#">标签</a></li></ul> -->
		</div>
		{if $cat}
		<p>
		<div class="tips tips-small tips-notice tips-no-icon">
          <div class="tips-content clearfix">
		  <div  class="span12">
			<h2>活动名称：【{$cat.name}】，{$cat.description}</h2>
			<p>把二维码或活动链接装修到您需要的位置即可启动活动</p>
		  </div>
		  <div class="span9">
			<div class="span3"><img src="{$cat.qrcode_url}" width="110" height="110" /></div>
			<div class="span4"><p>二维码地址：<input type="text" class="input input-large" value="{$cat.qrcode_url}" /></p><p>活动链接：<input  type="text" class="input input-large" value="{$cat.friend_link}"/></p></div>
		  </div>
		  </div>
        </div>
		</p>
		{/if}
		<p>
		{if $cat}
		<a href="/?m=umpadmin&a=cat_list&cat={$catid}&status=running" class="label label-success"><i class="icon-play icon-white"></i>进行中的</a> 
		<a href="/?m=umpadmin&a=cat_list&cat={$catid}&status=not_running" class="label label-info"><i class="icon-pause icon-white"></i>已结束的</a>
		{/if}
		<span class="label "><i class="icon-repeat icon-white"></i><a href="/?m=umpadmin&a=index" style="color:#FFF;text-decoration:none">返回查看</a></span> 
		{if $cat}
		<span class="label label-important offset1"><i class="icon-plus icon-white"></i><a href="/?m=umpadmin&c=event&a=step1&cat={$catid}&create=1" style="color:#FFF;text-decoration:none">增加一个</a></span> 
		{/if}
		{if !$cat}
		<a href="/?m=umpadmin&a=all_list" class="pull-right">所有</a>
		{/if}
		</p>
		<div>
		{foreach from=$proms.item_promotion_list.item_promotion item=item key=ac_key}
		<div data-promid="{$item.id}" class="panel js-pan-{$item.activity_id} {if $item.is_invite}panel-danger js-inv{else}{if $item.status=='running'}panel-primary{/if}{/if}">
			  <div class="panel-header clearfix js-event js-ev-{$item.activity_id}" style="cursor:pointer" data-eid="{$item.activity_id}">
				<h3 class="pull-left"><i class="icon-chevron-up {if $item.status=='running'}icon-white{/if} js-icon-{$item.activity_id}"></i> [<span class="game_name{$item.activity_id}">{$item.name}</span>] - <span class="event_title{$key}">{$item.description}</span>  {if $item.status=='stopped'}<i class="icon-pause"></i> {else}<i class="icon-play icon-white"></i> {/if} </h3><span class="auxiliary-text offset1" {if $item.status!='stopped'}style="color:#FFF"{/if}>({$item.start_time_str}开始 到 {$item.stop_time_str}结束)</span>
				<!-- <a href="/?m=Kxdr&c=Index&a=step1&edit={$key}" class="button button-mini  pull-right js-edit-ev-{$item.id}" ><i class=" icon-pencil"></i></a> -->
				<!-- <button class="button button-mini  pull-right"><i class="icon-arrow-down"></i></button> -->
			  </div>
			  <div class="panel-body js-content-{$item.activity_id} hide" style="line-height:24px">
			    <div class="panel-body">
					<div class="title pull-left">
					  <div class="clearfix">
					  <h1 class="pull-left event_title{$item.activity_id}">{$item.name} </h1>
					  <h4 class="pull-left auxiliary-text" style="margin-top:10px">邀请朋友达到{$item.friend_num}位，减钱{$item.decrease_amount/100}元购买以下商品：</h4>
					  </div>
					  <h4>{$item.start_time_str}开始 到 {$item.stop_time_str}结束</h4>
					  {if $item.adv_rule}
						  {foreach $item.adv_rule key=key item=adv}
						  <p><div class="tips tips-small tips-info">
							<span class="x-icon x-icon-small x-icon-info"><i class="icon icon-white icon-info"></i></span>
							<div class="tips-content">{$adv}</div>
						  </div>
						  </p>
						  {/foreach}
					  {/if}
					  <p class="item_count{$item.activity_id}"></p>
					</div>
					<div class="button-group pull-right" style="margin:0">
					  {if $ac!="all_list"}
					  <a class="button js-add-items" data-eid="{$item.activity_id}" data-id="{$ac_key}"><i class="icon-plus"></i>添加商品</a>
					  <a class="button js-edit-time" data-friend_num="{$item.friend_num}" data-decrease_amount="{$item.decrease_amount}" data-tag="{$item.user_tag_id}" data-name="{$item.name}" data-eid="{$item.activity_id}" data-id="{$ac_key}"  data-start_time="{$item.start_time}" data-end_time="{$item.end_time}"><i class="icon-pencil"></i>修改参数</a>
					  <a class="button {if $item.is_invite}button-danger{/if} js-set-invite invite-{$item.id}" data-eid="{$item.activity_id}" data-promid="{$item.id}"><i class="{if $item.is_invite}icon-white{/if} invite-icon-{$item.id} icon-screenshot"></i>设为被邀请折扣</a>
					  <a class="button "><i class="icon-user"></i>朋友关系</a>
					  {/if}
					</div>
				</div>
				<ul class="clearfix items{$item.activity_id}" style="text-align:center;overflow-y:scroll;max-height:500px">
				<img src="" />正在载入...
				<ol class="js-added-{$item.activity_id}"></ol>
				</ul>
				<input type="hidden" class="item-set-val{$item.activity_id}" value="" />
			  </div>
		</div>
		{/foreach}
		</div>
    <div>
      <div class="pagination pull-right">
	  {$page}
      </div>
    </div>
</div>
      </div>
    </div>
  </div>
  </div>
<div class="hide" id="adv_dialog">
<div class="row centered" >
<span class="pre-msg">购买</span>
<input name="q" type="text" class="value input input-small" value="">
<span class="aft-msg">次的老用户</span>
<input name="q" type="text" class="value1 input input-small" style="display:none" value="">
<span class="lst-msg hide">有过购买的老用户</span>
</div>
</div>
<div class="hide" id="adv_date">
<div class="row centered" >
<span>从</span>
<input name="q" type="text" class="start_time input calendar calendar-time" value="">
<span>到</span>
<input name="q" type="text" class="end_time input calendar calendar-time" value="">
<div class="msg-tip">有过购买的老用户</div>
</div>
<p></p>
<div class="row centered msg-info" >
<span>邀请达到</span>
<input name="q" type="text" class="friend_num input input-small" value="">
<span>位朋友，减钱</span>
<input name="q" type="text" class="decrease_amount input input-small" value="">
元
</div>
</div>
<div class="hide" id="adv_items">
<div class="row offset1 centered" >
<a class="button js-load-items"><i class="icon-plus"></i>添加商品</a> 
</div>
<ul class="adv_items_show">
</ul>
<ul class="clearfix js-added" style="overflow-y:scroll;max-height:500px"></ul>
</div>
<div class="hide" id="content">
<div class="row offset1 centered" >
<a class="button js-load-items" data-eitem="1"><i class="icon-plus"></i>添加商品</a> 
<a class="item-num"></a>
<input type="hidden" class="item-set-val" value="" />
</div>
<div class="items_show">
</div>
<ul class="clearfix js-added" style="overflow-y:scroll;max-height:500px"></ul>
</div>
</body>
</html>